package com.smart_campus.sys.controller;

import com.smart_campus.sys.common.ResultObj;
import com.smart_campus.sys.common.identityVerify;
import com.smart_campus.sys.domain.User;
import com.smart_campus.sys.domain.UserInfo;
import com.smart_campus.sys.service.BandingService;
import com.smart_campus.sys.service.UserInfoService;
import com.smart_campus.sys.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author:Omega
 * @Date:2020/7/2 10:06
 */

@Controller
@RequestMapping("banding")
public class BandingController {

    @Autowired
    BandingService bandingService;

    @Autowired
    private RedisTemplate<String, String> redisTemplate;

    @RequestMapping("identityBind")
    @ResponseBody
    public ResultObj identityBind(String username,String identity){
        return bandingService.BandingIdentity(username,identity);
    }

    @RequestMapping("phoneBind")
    @ResponseBody
    public ResultObj phoneBind(String phone, String sms){
        return bandingService.BandingPhone(phone,sms);
    }
}
